﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterNhanSuTienLuong.Master" Inherits="System.Web.Mvc.ViewPage<DTTB.MV2.QUANLYNHANSUTIENLUONG.Models.FormBean.ChamCongModel.NhanVienTrongBangChamCongForm>" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="<%= ResolveUrl("~/Content/Scripts/ChamCong/NhanVienTrongBangChamCong.js") %>"></script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    
    <div class="box">
        <%--<div class="title">
            <h5>Bảng Chấm Công Tháng <%= Model.Thang.ToString("#0") %>/<%= Model.Nam %></h5>
        </div>--%>
        
        <div class="breadcrumbs">
            <ul>
                <li class="home"><a href="">Quản Lý Chấm Công</a></li>
                <li>Bảng Chấm Công Tháng <%= Model.Thang.ToString("#0") %>/<%= Model.Nam %></li>
            </ul>
        </div>
        <div class="headlines">
            <h2>
                <span>Bảng Chấm Công Tháng <%= Model.Thang.ToString("#0") %>/<%= Model.Nam %></span>
            </h2>
        </div>
        
        <div class="box-content">
            <form id="form1" class="formBox">
                <input type="hidden" id="Id" name="Id" value="<%= Model.Id %>"/>
                <%: Html.HiddenFor(p => p.Thang) %>
                <%: Html.HiddenFor(p => p.Nam) %>
                <%: Html.HiddenFor(p => p.IsLock) %>
                <%: Html.HiddenFor(p => p.IsFinish) %>
                <%: Html.HiddenFor(p => p.IdNhanVienList) %>
                <input type="text" style="display: none;"/>
                <table class="table_outsite" style="width: 100%;">
                    <tr>
                        <td colspan="2">
                            <div id="MessageSuccess" class="MessageSuccess" style="font-size: 12px; color: Blue; font-weight: bold">
                                <%=Model.MessageSuccess%>
                            </div>
                            <div id="MessageError" class="MessageError" style="font-size: 12px; color: Red; font-weight: bold">
                                <%=Model.MessageError%>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left">
                            <b title="Danh sách nhân viên có trong bảng chấm công">Nhân Viên Trong Bảng Chấm Công Tháng <%= Model.Thang.ToString("#0") %>/<%= Model.Nam %></b>
                        </td>
                        <td align="right">
                            <div class="btn-submit" style="border-top: none; margin-bottom: 3px;">
                                <%: Html.DropDownList("TieuChiMot", Model.SelectListTieuChiTimKiemNhanVien)%>
                                <%: Html.TextBoxFor(p => p.GiaTriMot, new Dictionary<string, object> { { "onkeypress", "if (event.keyCode==13) { return DoSearch() }" } })%>
                                <img title="Tìm" alt="Tìm" src="/Content/ImagesAdmin/search_icon.gif" style="vertical-align: middle; cursor:pointer" onclick="javascript:DoSearch();">
                                <input type="button" class="button" value="Xóa Khỏi Bảng Chấm Công" id="btnXoaKhoaBangChamCong" <% if(Model.IsLock || Model.IsFinish) {%>disabled="disabled"<%}%> />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <table class="tab tab-drag">
                                <thead>
                                    <tr class="title">
                                        <td class="first" align="center" nowrap="nowrap" style="width: 80px;">
                                            <input type="checkbox" id="checkAll1" onclick="CheckAlls('checkAll1', 'checkSingle1', 'form1')"/>
                                        </td>
                                        <td align="center" nowrap="nowrap" style="width: 80px;">
                                            STT
                                        </td>
                                        <td nowrap="nowrap">
                                            <strong>Số Thẻ</strong>
                                        </td>
                                        <td nowrap="nowrap">
                                            <strong>Họ tên</strong>
                                        </td>
                                        <td nowrap="nowrap" style="width: 50px;">
                                            <strong>Giới tính</strong>
                                        </td>
                                        <td nowrap="nowrap" style="width: 80px;">
                                            <strong>Ngày Sinh</strong>
                                        </td>
                                        <td nowrap="nowrap">
                                            <strong>Phòng</strong>
                                        </td>
                                        <td nowrap="nowrap" class="last">
                                            <strong>Chức Vụ</strong>
                                        </td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <% 
                                        int stt = (Model.PageIndex - 1) * Model.ItemsPerPage + 1;
                                        foreach (var item in Model.ListNhanVienCoTrongBangChamCong)
                                        {
                                    %>
                                    <tr class="item_row">
                                        <td align="center" class="first">
                                            <input type="checkbox" name="checkSingle1" value="<%= item.NhanVien.IdNhanVien %>" onclick="CheckSingles('checkAll1', 'checkSingle1','form1');"/>
                                        </td>
                                        <td align="center">
                                            <%= stt %>
                                        </td>
                                        <td style="text-align: center; width: 60px;">
                                            <%= item.NhanVien.SoThe %>
                                        </td>
                                        <td nowrap="nowrap">
                                            <%= item.NhanVien.HoTen %>
                                        </td>
                                        <td nowrap="nowrap">
                                            <%= item.NhanVien.TenGioiTinh %>
                                        </td>
                                        <td nowrap="nowrap" style="text-align: center;">
                                            <%= item.NhanVien.NgaySinh %>
                                        </td>
                                        <td style="text-align: center;">
                                            <%= item.NhanVien.PhongBan %>
                                        </td>
                                        <td class="last" style="text-align: center;">
                                            <%= item.NhanVien.ChucVu %>
                                        </td>
                                    </tr>
                                    <%
                                    stt++;}
                                    %>
                                </tbody>
                                <tfoot>
                                    <tr class="border_bottom">
                                        <td class="first" style="background: #DDDDDD">
                                        </td>
                                        <td class="last" colspan="7" align="right" style="background: #DDDDDD; padding-right: 10px">
                                            <%
                                                PagerOptions pagerOptions = new PagerOptions();
                                                DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate.CommonDelegate CommonDelegate =
                                                        new DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate.CommonDelegate();

                                                CommonDelegate.ChangeTextPaging(pagerOptions, "pageIndex");
                                         
                                            %>
                                            <div>
                                                <%=Html.Pager(Model.TotalPage, Model.PageIndex, "NhanVienTrongBangChamCong", "ChamCong", pagerOptions, "Default1", new { id = Model.Id, pageIndex = Model.PageIndex }, new object())%></div>
                                            <%=Html.HiddenFor(p => p.PageIndex)%>
                                        </td>
                                    </tr>
                                </tfoot>
                            </table>
                        </td>
                    </tr>
                </table>
            </form>
            <div class="pagebreak">&nbsp;</div>
            <form id="form2" class="formBox">
                <input type="hidden" id="Id" name="Id" value="<%= Model.Id %>"/>
                <%: Html.HiddenFor(p => p.Thang) %>
                <%: Html.HiddenFor(p => p.Nam) %>
                <%: Html.HiddenFor(p => p.IsLock) %>
                <%: Html.HiddenFor(p => p.IsFinish) %>
                <%: Html.HiddenFor(p => p.IdNhanVienList) %>
                <input type="text" style="display: none;"/>
                <table class="table_outsite" style="width: 100%;">
                    <tr>
                        <td style="text-align: left">
                            <b title="Danh sách nhân viên không có trong bảng chấm công">Nhân Viên Không Có Trong Bảng Chấm Công</b>
                        </td>
                        <td align="right">
                            <div class="btn-submit" style="border-top: none; margin-bottom: 3px;">
                                <input type="button" class="button" value="Thêm vào Bảng Chấm Công" id="btnThemVaoBangChamCong" <% if(Model.IsLock || Model.IsFinish) {%>disabled="disabled"<%}%> />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <table class="tab tab-drag">
                                <thead>
                                    <tr class="title">
                                        <td class="first" align="center" nowrap="nowrap" style="width: 80px;">
                                            <input type="checkbox" id="checkAll2" onclick="CheckAlls('checkAll2', 'checkSingle2', 'form2')"/>
                                        </td>
                                        <td align="center" nowrap="nowrap" style="width: 80px;">
                                            STT
                                        </td>
                                        <td nowrap="nowrap">
                                            <strong>Số Thẻ</strong>
                                        </td>
                                        <td nowrap="nowrap">
                                            <strong>Họ tên</strong>
                                        </td>
                                        <td nowrap="nowrap" style="width: 50px;">
                                            <strong>Giới tính</strong>
                                        </td>
                                        <td nowrap="nowrap" style="width: 80px;">
                                            <strong>Ngày Sinh</strong>
                                        </td>
                                        <td nowrap="nowrap">
                                            <strong>Phòng</strong>
                                        </td>
                                        <td nowrap="nowrap" class="last">
                                            <strong>Chức Vụ</strong>
                                        </td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <% 
                                        int sttNhanVien = 1;
                                        foreach (var item in Model.ListNhanVienKhongCoTrongBangChamCong)
                                        {
                                    %>
                                    <tr class="item_row">
                                        <td align="center" class="first">
                                            <input type="checkbox" name="checkSingle2" value="<%= item.NhanVien.IdNhanVien %>" onclick="CheckSingles('checkAll2', 'checkSingle2','form2');"/>
                                        </td>
                                        <td align="center">
                                            <%= sttNhanVien%>
                                        </td>
                                        <td style="text-align: center; width: 60px;">
                                            <%= item.NhanVien.SoThe %>
                                        </td>
                                        <td nowrap="nowrap">
                                            <%= item.NhanVien.HoTen %>
                                        </td>
                                        <td nowrap="nowrap">
                                            <%= item.NhanVien.TenGioiTinh %>
                                        </td>
                                        <td nowrap="nowrap" style="text-align: center;">
                                            <%= item.NhanVien.NgaySinh %>
                                        </td>
                                        <td style="text-align: center;">
                                            <%= item.NhanVien.PhongBan %>
                                        </td>
                                        <td class="last" style="text-align: center;">
                                            <%= item.NhanVien.ChucVu %>
                                        </td>
                                    </tr>
                                    <%
                                            sttNhanVien++;
                                        }
                                    %>
                                </tbody>
                                <tfoot>
                                    <tr class="border_bottom">
                                        <td class="first" style="background: #DDDDDD">
                                        </td>
                                        <td class="last" colspan="7" align="right" style="background: #DDDDDD; padding-right: 10px">
                                        </td>
                                    </tr>
                                </tfoot>
                        
                            </table>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>

</asp:Content>
